<!DOCTYPE html>


<html lang="en">
  

    <head>
      <meta charset="utf-8" />
        
      <meta name="description" content="時光的个人博客" />
      
      <meta
        name="viewport"
        content="width=device-width, initial-scale=1, maximum-scale=1"
      />
	  <meta name="referrer" content="no-referrer" />

      <title>時光的免费GPT服务 |  時光</title>
  <meta name="generator" content="hexo-theme-ayer">
      
      <link rel="shortcut icon" href="/favicon.ico" />
       
<link rel="stylesheet" href="/dist/main.css">

      
<link rel="stylesheet" href="/css/fonts/remixicon.css">

      
<link rel="stylesheet" href="/css/custom.css">
 
      <script src="https://cdn.staticfile.org/pace/1.2.4/pace.min.js"></script>
       
 

      <link
        rel="stylesheet"
        href="https://cdn.jsdelivr.net/npm/@sweetalert2/theme-bulma@5.0.1/bulma.min.css"
      />
      <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11.0.19/dist/sweetalert2.min.js"></script>

      <!-- mermaid -->
      
      <style>
        .swal2-styled.swal2-confirm {
          font-size: 1.6rem;
        }
      </style>
    <link rel="alternate" href="/atom.xml" title="時光" type="application/atom+xml">
</head>
  </html>
</html>


<body>
  <div id="app">
    
      
    <main class="content on">
      <section class="outer">
  <article
  id="post-時光的免费GPT服务"
  class="article article-type-post"
  itemscope
  itemprop="blogPost"
  data-scroll-reveal
>
  <div class="article-inner">
    
    <header class="article-header">
       
<h1 class="article-title sea-center" style="border-left:0" itemprop="name">
  時光的免费GPT服务
</h1>
 

      
    </header>
     
    <div class="article-meta">
      <a href="/2023/06/23/%E6%99%82%E5%85%89%E7%9A%84%E5%85%8D%E8%B4%B9GPT%E6%9C%8D%E5%8A%A1/" class="article-date">
  <time datetime="2023-06-23T04:38:38.000Z" itemprop="datePublished">2023-06-23</time>
</a> 
  <div class="article-category">
    <a class="article-category-link" href="/categories/%E5%B7%A5%E5%85%B7%E7%AE%B1/">工具箱</a>
  </div>
  
<div class="word_count">
    <span class="post-time">
        <span class="post-meta-item-icon">
            <i class="ri-quill-pen-line"></i>
            <span class="post-meta-item-text"> Word count:</span>
            <span class="post-count">686</span>
        </span>
    </span>

    <span class="post-time">
        &nbsp; | &nbsp;
        <span class="post-meta-item-icon">
            <i class="ri-book-open-line"></i>
            <span class="post-meta-item-text"> Reading time≈</span>
            <span class="post-count">2 min</span>
        </span>
    </span>
</div>
 
    </div>
      
    <div class="tocbot"></div>




  
    <div class="article-entry" itemprop="articleBody">
       
  <p>目前提供4个免费服务，3个ChatGPT服务和一个NewBing服务，均不需要魔法，兼容移动端</p>
<p>所提供的服务均基于开源项目进行部署，项目地址均有提供，现有服务均部署在代码托管平台 <a target="_blank" rel="noopener" href="https://vercel.com/">Vercel</a> 上</p>
<p>如果你也想要搭建一个自己的服务，仅需将开源项目Fork到自己的<a target="_blank" rel="noopener" href="https://github.com/">github</a>仓库，点击一键部署即可免费部署</p>
<h1 id="1、pandora"><a href="#1、pandora" class="headerlink" title="1、pandora"></a>1、pandora</h1><blockquote>
<p><a target="_blank" rel="noopener" href="https://chatgpt.shiguang666.eu.org/">直通车 : https://chatgpt.shiguang666.eu.org/</a></p>
</blockquote>
<p>基于开源项目 <a target="_blank" rel="noopener" href="https://github.com/pengzhile/pandora">pandora</a>搭建,可通过OpenAI账号或AccessToken登录</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202306/2233039-20230623124505658-1322894106.png" alt="image-20230623124505442"></p>
<p>点击 <code>Continue with Access Token</code> 可采用Access Token进行登录，输入自己的Access Token 即可</p>
<p>Access Token 有效期为半个月，采用该方式登录每半个月需要重新获取一次</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202306/2233039-20230623135923691-230062675.png" alt="image-20230623135924192"></p>
<p><strong>Access Token 获取方式</strong></p>
<p>在<a target="_blank" rel="noopener" href="https://chat.openai.com/auth/login">ChatGPT官网</a>登录后，访问**<a target="_blank" rel="noopener" href="https://chat.openai.com/api/auth/session">https://chat.openai.com/api/auth/session</a>**即可获取Access Token </p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202306/2233039-20230623140342976-248814744.png" alt="image-20230623140343068"></p>
<p>让它写个冒泡排序看一下效果吧</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202306/2233039-20230623150611354-1875732832.png" alt="image-20230623150611510"></p>
<p>效果还不错</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202306/2233039-20230623150708510-1961407475.png" alt="image-20230623150708927"></p>
<h1 id="2、ChatGPT-Next-Web"><a href="#2、ChatGPT-Next-Web" class="headerlink" title="2、ChatGPT-Next-Web"></a>2、ChatGPT-Next-Web</h1><blockquote>
<p><a target="_blank" rel="noopener" href="https://gpt.shiguang666.eu.org/">直通车：https://gpt.shiguang666.eu.org/</a></p>
</blockquote>
<p>基于开源项目  <a target="_blank" rel="noopener" href="https://github.com/Yidadaa/ChatGPT-Next-Web">ChatGPT-Next-Web</a> 搭建，可通过API Key 或我提供的访问密码访问</p>
<p>通过访问密码访问实际消耗的是我的API key的余额，纯纯地为爱发电了</p>
<p><strong>访问密码：shiguang、shiguang666、shiguang888均可</strong></p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202306/2233039-20230623130136696-923051977.png" alt="image-20230623130136951"></p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202306/2233039-20230623140628427-1176698393.png" alt="image-20230623140628673"></p>
<p><strong>API Key 获取方式</strong></p>
<p>在<a target="_blank" rel="noopener" href="https://chat.openai.com/auth/login">ChatGPT官网</a>登录后，访问<a target="_blank" rel="noopener" href="https://platform.openai.com/account/api-keys">https://platform.openai.com/account/api-keys</a></p>
<p>点击 <code>Create new secret key</code> 创建一个新的key</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202306/2233039-20230623152051717-986166001.png" alt="image-20230623152052094"></p>
<p>名称可随便输入，用于区分不同的key</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202306/2233039-20230623141310502-392269563.png" alt="image-20230623141310816"></p>
<p>再次点击 <code>Create secret key</code> 后会生成 一个新的key，该key只显示一次，可复制保存起来</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202306/2233039-20230623141506490-510570772.png" alt="image-20230623141506757"></p>
<h1 id="3、chatbot-ui"><a href="#3、chatbot-ui" class="headerlink" title="3、chatbot-ui"></a>3、chatbot-ui</h1><blockquote>
<p><a target="_blank" rel="noopener" href="https://chatbot.shiguang666.eu.org/">直通车：https://chatbot.shiguang666.eu.org/</a></p>
</blockquote>
<p>基于开源项目 <a target="_blank" rel="noopener" href="https://github.com/mckaywrigley/chatbot-ui">chatbot-ui</a> 搭建，可通过API Key 进行访问</p>
<p>一个暗黑主题Chatbot UI，支持导入、导出对话、设置自定义提示词功能</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202306/2233039-20230623131435988-472713035.png" alt="image-20230623131436278"></p>
<p>在右上方点击新建提示可以自定义提示词</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202306/2233039-20230623142944365-20003562.png" alt="image-20230623142944649"></p>
<p>提示词可以参考 <a target="_blank" rel="noopener" href="https://github.com/PlexPt/awesome-chatgpt-prompts-zh">ChatGPT 中文调教指南</a></p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202306/2233039-20230623142806353-579402189.png" alt="image-20230623142806694"></p>
<h1 id="4、BingAI-Client"><a href="#4、BingAI-Client" class="headerlink" title="4、BingAI-Client"></a>4、BingAI-Client</h1><blockquote>
<p><a target="_blank" rel="noopener" href="https://newbing.shiguang666.eu.org/">直通车:https://newbing.shiguang666.eu.org/</a></p>
</blockquote>
<p>基于开源项目 <a target="_blank" rel="noopener" href="https://github.com/xbzstudio/BingAI-Client">BingAI-Client </a> 搭建，可直接访问</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202306/2233039-20230623131538939-606595581.png" alt="image-20230623131538915"></p>
<p>支持联网、并且所有回答都附有相关链接</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202306/2233039-20230623143713359-639366602.png" alt="2023-06-23_143456"></p>
<p>问答的时候可以响应图片，不过兼容性做的不是很好</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202306/2233039-20230623144310735-1643510665.png" alt="image-20230623144311096"></p>
<p>可以点击画图体验画图功能，不过效果和midjourney相比还有一定距离</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202306/2233039-20230623144550923-1355886502.png" alt="image-20230623144551142"></p>
<p>也可以进行AI创作，让它写一下今年的高考作文吧</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202306/2233039-20230623145556825-1902190681.png" alt="image-20230623145556941"></p>
<h1 id="5、小贴士"><a href="#5、小贴士" class="headerlink" title="5、小贴士"></a>5、小贴士</h1><p>通过OpenAI账号登录或AccessToken登录是真正的不限次数访问</p>
<p>通过API Key访问需要消耗账户内余额，每个免费账号有5美元API调用余额而且是会过期的</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202306/2233039-20230623133118819-1157994986.png" alt="image-20230623133119076"></p>
<p>另外，对于不同账户，通过API访问的限速级别也是不同的</p>
<p><img src="https://img2023.cnblogs.com/blog/2233039/202306/2233039-20230623134007784-113165402.png" alt="image-20230623134008145"></p>
<p>相关推荐</p>
<p><a target="_blank" rel="noopener" href="https://www.cnblogs.com/an-shiguang/p/17308296.html">玩转ChatGPT</a></p>
 
      <!-- reward -->
      
      <div id="reword-out">
        <div id="reward-btn">
          Donate
        </div>
      </div>
      
    </div>
    

    <!-- copyright -->
    
    <div class="declare">
      <ul class="post-copyright">
        <li>
          <i class="ri-copyright-line"></i>
          <strong>Copyright： </strong>
          
          Copyright is owned by the author. For commercial reprints, please contact the author for authorization. For non-commercial reprints, please indicate the source.
          
        </li>
      </ul>
    </div>
    
    <footer class="article-footer">
       
<div class="share-btn">
      <span class="share-sns share-outer">
        <i class="ri-share-forward-line"></i>
        分享
      </span>
      <div class="share-wrap">
        <i class="arrow"></i>
        <div class="share-icons">
          
          <a class="weibo share-sns" href="javascript:;" data-type="weibo">
            <i class="ri-weibo-fill"></i>
          </a>
          <a class="weixin share-sns wxFab" href="javascript:;" data-type="weixin">
            <i class="ri-wechat-fill"></i>
          </a>
          <a class="qq share-sns" href="javascript:;" data-type="qq">
            <i class="ri-qq-fill"></i>
          </a>
          <a class="douban share-sns" href="javascript:;" data-type="douban">
            <i class="ri-douban-line"></i>
          </a>
          <!-- <a class="qzone share-sns" href="javascript:;" data-type="qzone">
            <i class="icon icon-qzone"></i>
          </a> -->
          
          <a class="facebook share-sns" href="javascript:;" data-type="facebook">
            <i class="ri-facebook-circle-fill"></i>
          </a>
          <a class="twitter share-sns" href="javascript:;" data-type="twitter">
            <i class="ri-twitter-fill"></i>
          </a>
          <a class="google share-sns" href="javascript:;" data-type="google">
            <i class="ri-google-fill"></i>
          </a>
        </div>
      </div>
</div>

<div class="wx-share-modal">
    <a class="modal-close" href="javascript:;"><i class="ri-close-circle-line"></i></a>
    <p>扫一扫，分享到微信</p>
    <div class="wx-qrcode">
      <img src="//api.qrserver.com/v1/create-qr-code/?size=150x150&data=http://example.com/2023/06/23/%E6%99%82%E5%85%89%E7%9A%84%E5%85%8D%E8%B4%B9GPT%E6%9C%8D%E5%8A%A1/" alt="微信分享二维码">
    </div>
</div>

<div id="share-mask"></div>  
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/AI/" rel="tag">AI</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/ChatGPT/" rel="tag">ChatGPT</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/NewBing/" rel="tag">NewBing</a></li></ul>

    </footer>
  </div>

   
  <nav class="article-nav">
    
      <a href="/2023/07/11/%E8%BF%9C%E7%A8%8BDebug%E8%B0%83%E8%AF%95/" class="article-nav-link">
        <strong class="article-nav-caption">上一篇</strong>
        <div class="article-nav-title">
          
            IDEA远程Debug调试配置
          
        </div>
      </a>
    
    
      <a href="/2023/05/26/Mysql%E6%9F%A5%E8%AF%A2%E6%97%B6%E7%94%9F%E6%88%90%E7%B4%A2%E5%BC%95%E5%88%97/" class="article-nav-link">
        <strong class="article-nav-caption">下一篇</strong>
        <div class="article-nav-title">Mysql查询时生成索引列</div>
      </a>
    
  </nav>

   
<!-- valine评论 -->
<div id="vcomments-box">
  <div id="vcomments"></div>
</div>
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
<script src="https://cdn.staticfile.org/valine/1.4.16/Valine.min.js"></script>
<script>
  new Valine({
    el: "#vcomments",
    app_id: "dx3B54wOwhi75vxC2IAZagtg-gzGzoHsz",
    app_key: "m4k2fhnFa1iPI4vbofHqMY5X",
    path: window.location.pathname,
    avatar: "monsterid",
    placeholder: "给我的文章加点评论吧~",
    recordIP: true,
  });
  const infoEle = document.querySelector("#vcomments .info");
  if (infoEle && infoEle.childNodes && infoEle.childNodes.length > 0) {
    infoEle.childNodes.forEach(function (item) {
      item.parentNode.removeChild(item);
    });
  }
</script>
<style>
  #vcomments-box {
    padding: 5px 30px;
  }

  @media screen and (max-width: 800px) {
    #vcomments-box {
      padding: 5px 0px;
    }
  }

  #vcomments-box #vcomments {
    background-color: #fff;
  }

  .v .vlist .vcard .vh {
    padding-right: 20px;
  }

  .v .vlist .vcard {
    padding-left: 10px;
  }
</style>

 
   
  
   
    <script src="https://cdn.staticfile.org/twikoo/1.4.18/twikoo.all.min.js"></script>
    <div id="twikoo" class="twikoo"></div>
    <script>
        twikoo.init({
            envId: ""
        })
    </script>
 
</article>

</section>
      <footer class="footer">
  <div class="outer">
    <ul>
      <li>
        Copyrights &copy;
        2023
        <i class="ri-heart-fill heart_icon"></i> Shiguang
      </li>
    </ul>
    <ul>
      <li>
        
      </li>
    </ul>
    <ul>
      <li>
        
        
        <span>
  <span><i class="ri-user-3-fill"></i>Visitors:<span id="busuanzi_value_site_uv"></span></span>
  <span class="division">|</span>
  <span><i class="ri-eye-fill"></i>Views:<span id="busuanzi_value_page_pv"></span></span>
</span>
        
      </li>
    </ul>
    <ul>
      
    </ul>
    <ul>
      
    </ul>
    <ul>
      <li>
        <!-- cnzz统计 -->
        
        <script type="text/javascript" src='https://s9.cnzz.com/z_stat.php?id=1278069914&amp;web_id=1278069914'></script>
        
      </li>
    </ul>
  </div>
</footer>    
    </main>
    <div class="float_btns">
      <div class="totop" id="totop">
  <i class="ri-arrow-up-line"></i>
</div>

<div class="todark" id="todark">
  <i class="ri-moon-line"></i>
</div>

    </div>
    <aside class="sidebar on">
      <button class="navbar-toggle"></button>
<nav class="navbar">
  
  <div class="logo">
    <a href="/"><img src="/images/ayer-side.svg" alt="時光"></a>
  </div>
  
  <ul class="nav nav-main">
    
    <li class="nav-item">
      <a class="nav-item-link" href="/">主页</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/archives">归档</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/categories">分类</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/tags">标签</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/friends">友链</a>
    </li>
    
  </ul>
</nav>
<nav class="navbar navbar-bottom">
  <ul class="nav">
    <li class="nav-item">
      
      <a class="nav-item-link nav-item-search"  title="Search">
        <i class="ri-search-line"></i>
      </a>
      
      
      <a class="nav-item-link" target="_blank" href="/atom.xml" title="RSS Feed">
        <i class="ri-rss-line"></i>
      </a>
      
    </li>
  </ul>
</nav>
<div class="search-form-wrap">
  <div class="local-search local-search-plugin">
  <input type="search" id="local-search-input" class="local-search-input" placeholder="Search...">
  <div id="local-search-result" class="local-search-result"></div>
</div>
</div>
    </aside>
    <div id="mask"></div>

<!-- #reward -->
<div id="reward">
  <span class="close"><i class="ri-close-line"></i></span>
  <p class="reward-p"><i class="ri-cup-line"></i>请我喝杯咖啡吧~</p>
  <div class="reward-box">
    
    <div class="reward-item">
      <img class="reward-img" src="/images/alipay.jpg">
      <span class="reward-type">支付宝</span>
    </div>
    
    
    <div class="reward-item">
      <img class="reward-img" src="/images/wechat.jpg">
      <span class="reward-type">微信</span>
    </div>
    
  </div>
</div>
    
<script src="/js/jquery-3.6.0.min.js"></script>
 
<script src="/js/lazyload.min.js"></script>

<!-- Tocbot -->
 
<script src="/js/tocbot.min.js"></script>

<script>
  tocbot.init({
    tocSelector: ".tocbot",
    contentSelector: ".article-entry",
    headingSelector: "h1, h2, h3, h4, h5, h6",
    hasInnerContainers: true,
    scrollSmooth: true,
    scrollContainer: "main",
    positionFixedSelector: ".tocbot",
    positionFixedClass: "is-position-fixed",
    fixedSidebarOffset: "auto",
  });
</script>

<script src="https://cdn.staticfile.org/jquery-modal/0.9.2/jquery.modal.min.js"></script>
<link
  rel="stylesheet"
  href="https://cdn.staticfile.org/jquery-modal/0.9.2/jquery.modal.min.css"
/>
<script src="https://cdn.staticfile.org/justifiedGallery/3.8.1/js/jquery.justifiedGallery.min.js"></script>

<script src="/dist/main.js"></script>

<!-- ImageViewer -->
 <!-- Root element of PhotoSwipe. Must have class pswp. -->
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">

    <!-- Background of PhotoSwipe. 
         It's a separate element as animating opacity is faster than rgba(). -->
    <div class="pswp__bg"></div>

    <!-- Slides wrapper with overflow:hidden. -->
    <div class="pswp__scroll-wrap">

        <!-- Container that holds slides. 
            PhotoSwipe keeps only 3 of them in the DOM to save memory.
            Don't modify these 3 pswp__item elements, data is added later on. -->
        <div class="pswp__container">
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
        </div>

        <!-- Default (PhotoSwipeUI_Default) interface on top of sliding area. Can be changed. -->
        <div class="pswp__ui pswp__ui--hidden">

            <div class="pswp__top-bar">

                <!--  Controls are self-explanatory. Order can be changed. -->

                <div class="pswp__counter"></div>

                <button class="pswp__button pswp__button--close" title="Close (Esc)"></button>

                <button class="pswp__button pswp__button--share" style="display:none" title="Share"></button>

                <button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>

                <button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>

                <!-- Preloader demo http://codepen.io/dimsemenov/pen/yyBWoR -->
                <!-- element will get class pswp__preloader--active when preloader is running -->
                <div class="pswp__preloader">
                    <div class="pswp__preloader__icn">
                        <div class="pswp__preloader__cut">
                            <div class="pswp__preloader__donut"></div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
                <div class="pswp__share-tooltip"></div>
            </div>

            <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
            </button>

            <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
            </button>

            <div class="pswp__caption">
                <div class="pswp__caption__center"></div>
            </div>

        </div>

    </div>

</div>

<link rel="stylesheet" href="https://cdn.staticfile.org/photoswipe/4.1.3/photoswipe.min.css">
<link rel="stylesheet" href="https://cdn.staticfile.org/photoswipe/4.1.3/default-skin/default-skin.min.css">
<script src="https://cdn.staticfile.org/photoswipe/4.1.3/photoswipe.min.js"></script>
<script src="https://cdn.staticfile.org/photoswipe/4.1.3/photoswipe-ui-default.min.js"></script>

<script>
    function viewer_init() {
        let pswpElement = document.querySelectorAll('.pswp')[0];
        let $imgArr = document.querySelectorAll(('.article-entry img:not(.reward-img)'))

        $imgArr.forEach(($em, i) => {
            $em.onclick = () => {
                // slider展开状态
                // todo: 这样不好，后面改成状态
                if (document.querySelector('.left-col.show')) return
                let items = []
                $imgArr.forEach(($em2, i2) => {
                    let img = $em2.getAttribute('data-idx', i2)
                    let src = $em2.getAttribute('data-target') || $em2.getAttribute('src')
                    let title = $em2.getAttribute('alt')
                    // 获得原图尺寸
                    const image = new Image()
                    image.src = src
                    items.push({
                        src: src,
                        w: image.width || $em2.width,
                        h: image.height || $em2.height,
                        title: title
                    })
                })
                var gallery = new PhotoSwipe(pswpElement, PhotoSwipeUI_Default, items, {
                    index: parseInt(i)
                });
                gallery.init()
            }
        })
    }
    viewer_init()
</script> 
<!-- MathJax -->

<!-- Katex -->

<!-- busuanzi  -->
 
<script src="/js/busuanzi-2.3.pure.min.js"></script>
 
<!-- ClickLove -->

<!-- ClickBoom1 -->

<!-- ClickBoom2 -->

<!-- CodeCopy -->
 
<link rel="stylesheet" href="/css/clipboard.css">
 <script src="https://cdn.staticfile.org/clipboard.js/2.0.10/clipboard.min.js"></script>
<script>
  function wait(callback, seconds) {
    var timelag = null;
    timelag = window.setTimeout(callback, seconds);
  }
  !function (e, t, a) {
    var initCopyCode = function(){
      var copyHtml = '';
      copyHtml += '<button class="btn-copy" data-clipboard-snippet="">';
      copyHtml += '<i class="ri-file-copy-2-line"></i><span>COPY</span>';
      copyHtml += '</button>';
      $(".highlight .code pre").before(copyHtml);
      $(".article pre code").before(copyHtml);
      var clipboard = new ClipboardJS('.btn-copy', {
        target: function(trigger) {
          return trigger.nextElementSibling;
        }
      });
      clipboard.on('success', function(e) {
        let $btn = $(e.trigger);
        $btn.addClass('copied');
        let $icon = $($btn.find('i'));
        $icon.removeClass('ri-file-copy-2-line');
        $icon.addClass('ri-checkbox-circle-line');
        let $span = $($btn.find('span'));
        $span[0].innerText = 'COPIED';
        
        wait(function () { // 等待两秒钟后恢复
          $icon.removeClass('ri-checkbox-circle-line');
          $icon.addClass('ri-file-copy-2-line');
          $span[0].innerText = 'COPY';
        }, 2000);
      });
      clipboard.on('error', function(e) {
        e.clearSelection();
        let $btn = $(e.trigger);
        $btn.addClass('copy-failed');
        let $icon = $($btn.find('i'));
        $icon.removeClass('ri-file-copy-2-line');
        $icon.addClass('ri-time-line');
        let $span = $($btn.find('span'));
        $span[0].innerText = 'COPY FAILED';
        
        wait(function () { // 等待两秒钟后恢复
          $icon.removeClass('ri-time-line');
          $icon.addClass('ri-file-copy-2-line');
          $span[0].innerText = 'COPY';
        }, 2000);
      });
    }
    initCopyCode();
  }(window, document);
</script>
 
<!-- CanvasBackground -->

<script>
  if (window.mermaid) {
    mermaid.initialize({ theme: "forest" });
  }
</script>


    
    

  </div>
</body>

</html>